package net.qiqbframework.accessing;

import java.util.HashMap;
import java.util.Map;

public class SimpleClientChannel implements ClientChannel {

    private Map<Class<?>, Object> clientObjectMap = new HashMap<>();


    @Override
    public <T> void export(Class<T> interfaceClass, T client) {
        clientObjectMap.put(interfaceClass, client);
    }

    @Override
    public <T> T refer(Class<T> interfaceClass) {
        return (T) clientObjectMap.get(interfaceClass);
    }
}
